package com.hongguan.oms.service;

import java.util.HashMap;

import org.springframework.stereotype.Service;

/**
 * @author Greco Shi
 * @date 2010-1-1
 * @version $Id: AttachmentService.java 1003 2010-02-05 07:17:58Z shixuhua $
 */

@SuppressWarnings("unchecked")
@Service
public class AttachmentService extends BaseService {
	
	public AttachmentService() {
		this.namespace = "Attachment";
	}
	
	public Long addFile(String by, String filePath, String format, String note) {
		HashMap params = new HashMap();
		params.put("userId", by);
		params.put("note", note);
		params.put("format", format);
		params.put("filePath", filePath);
		return (Long)this.getSqlMapClientTemplate().insert(this.getStatementName("addFile"), params);
	}
}
